<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>底部固定</title>
    <link rel="stylesheet" href="../libs/bootstrap/css/bootstrap.min.css">

    <script type="text/javascript" src="../libs/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="../libs/bootstrap/js/bootstrap.js"></script>

    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <style type="text/css">
        * {
            margin: 0;
        }

        html, body {
            height: 100%;
        }

        .wrapper {
            min-height: 100%;
            height: auto !important;
            height: 100%;
            margin: 0 auto -6em;
        }

        /*push和footer的高度不一样是因为加了一条hr*/
        .push {
            height: 6em;
        }

        .footer, {
            height: 4em;
        }
    </style>
</head>
<body>

<div class="wrapper">
    <div class="container text-center">
        <p>这里是内容</p>
    </div>
    <div class="push"></div>
</div>

<footer class="footer">
    <div class=" col-lg-12 text-center">
        <hr>
        <p>Copyright &copy; zhangjk 2015</p>
    </div>
</footer>

</body>
</html>